#include "widget.h"
#include "ui_widget.h"
#include "QDebug"
//#include "QRadioButton"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //设置单选默认值
    ui->radioman->setChecked(true);
    ui->radioButton_4->setChecked(true);
    connect(ui->radiowonman,&QRadioButton::clicked,this,[=](){
        qDebug()<<"选中女的";
    });
    connect(ui->cbox,&QCheckBox::stateChanged,this,[=](int state){
        //在ui设计里面勾上CheckBox就有三种情况，半选
        qDebug()<<"选择好了"<<state;
    });
}

Widget::~Widget()
{
    delete ui;
}

